package com.multidb.configdemo.controller;


import com.multidb.configdemo.entity.order.Order;
import com.multidb.configdemo.entity.user.User;
import com.multidb.configdemo.service.OrderService;
import com.multidb.configdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    @Autowired
    UserService userService;
    @Autowired
    OrderService orderService;

    @GetMapping("/getUser")
    public User getUser() {
        return userService.getUser();
    }

    @GetMapping("/getOrder")
    public Order getOrder() {
        return orderService.getOrder();
    }

}
